<template>
    <div class="card-page">
        <el-row :gutter="12" type="flex">
            <el-col :span="12">
                <el-card shadow="always">
                    <template #header v-if="title">

                        <span>{{title}}</span>
                    </template>
                </el-card>
            </el-col>

        </el-row>
    </div>
</template>
<style scoped lang="scss">
</style>
<script setup>
/**
 * Created by CodeGenerator  at 2023-10-03 20:42:08
 */



defineOptions({
    name: "map-card",
    inheritAttrs: true,
});

//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();



//定义data
const $data = reactive({"info":{}});
const info = $computed(()=> $data.info );

const $props = defineProps({
    id: { type: String } ,
    action: { type: String } ,
    title : { type: String }
});

const action_name = $computed(()=>{
    return {add: "添加", edit: "修改"}[$props.action]
});
const $model = defineModel({ type: Object });



const list = ref();

//定义事件
const $emit = defineEmits(["update:modelValue","loaded"]);


watch($model, function(v) {
    if( $data.info == v) return;
    $data.info = v;
} ,{ immediate:true });
watch(info, function(v) {
    if( $data.info == v) return;
    $emit("update:modelValue",v)
} ,{ immediate:true });

</script>
